gridpack::powerflow::PFBus Class Reference

#include <pf_components.hpp>

Inheritance diagram for gridpack::powerflow::PFBus:
Inheritance graph
[legend]
Collaboration diagram for gridpack::powerflow::PFBus:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PFBus (void)
 ~PFBus (void)
bool matrixDiagSize (int *isize, int *jsize) const
bool matrixDiagValues (ComplexType *values)
bool matrixDiagValues (RealType *values)
bool vectorSize (int *isize) const
bool vectorValues (ComplexType *values)
bool vectorValues (RealType *values)
void setValues (gridpack::ComplexType *values)
void setValues (gridpack::RealType *values)
int getXCBufSize (void)
void setXCBuf (void *buf)
void setYBus (void)
gridpack::ComplexType getYBus (void)
void load (const boost::shared_ptr< gridpack::component::DataCollection > &data)
void setMode (int mode)
void resetVoltage (void)
void setVoltageLimits (double vmin, double vmax)
bool checkVoltageViolation (void)
double getVoltage (void)
ComplexType getComplexVoltage (void)
double getPhase (void)
bool getGenStatus (std::string gen_id)
std::vector< std::string > getGenerators ()
std::vector< std::string > getLoads ()
bool isPV (void)
void setVoltage (void)
void setPhase (void)
void setGenStatus (std::string gen_id, bool status)
void setIsPV (int status)
void resetIsPV ()
void setSBus (void)
bool serialWrite (char *string, const int bufsize, const char *signal=NULL)
bool chkQlim (void)
void clearQlim ()
void saveData (boost::shared_ptr< gridpack::component::DataCollection > data)
void setParam (std::string name, int busID, std::string genID, double value)
void setParam (int busID, std::string genID, double value)
void getParam (std::string &name, double *value, int idx)
void getParam (std::string &name, int *value, int idx)
int getElementIndex (std::string &name, std::string &tag)
void setIgnore (bool flag)
bool getIgnore ()
int getArea ()
int getZone ()
int diagonalJacobianValues (double *rvals)
int rhsValues (double *rvals)
void pushIsPV ()
std::vector< double > getGeneratorParticipation ()
void setGeneratorRealPower (std::string tag, double value, gridpack::component::DataCollection *data)
void scaleGeneratorRealPower (std::string tag, double value)
void setLoadRealPower (std::string tag, double value, gridpack::component::DataCollection *data)
void scaleLoadPower (std::string tag, double value)
void resetPower ()
void getGeneratorMargins (std::vector< std::string > &tag, std::vector< double > &current, std::vector< double > &pmin, std::vector< double > &pmax, std::vector< int > &status)
void getLoadPower (std::vector< std::string > &tag, std::vector< double > &pl, std::vector< double > &ql, std::vector< int > &status)
void setSource (bool flag)
void setSink (bool flag)
void setScale (double scale)

Constructor & Destructor Documentation

gridpack::powerflow::PFBus::PFBus ( void   ) 

Simple constructor

gridpack::powerflow::PFBus::~PFBus ( void   ) 

Simple destructor


Member Function Documentation

bool gridpack::powerflow::PFBus::checkVoltageViolation ( void   ) 

Check voltage for violation

Returns:
false if there is a voltage violation
bool gridpack::powerflow::PFBus::chkQlim ( void   ) 

chkQlim check QLIM violations

void gridpack::powerflow::PFBus::clearQlim (  ) 

Clear changes that were made for Q limit violations and reset bus to its original state

int gridpack::powerflow::PFBus::diagonalJacobianValues ( double *  rvals  ) 

Evaluate diagonal block of Jacobian for power flow calculation and return result as an array of real values

Parameters:
rvals values of Jacobian block
Returns:
number of values returned
int gridpack::powerflow::PFBus::getArea (  ) 

Get area parameter for bus

Returns:
bus area index
ComplexType gridpack::powerflow::PFBus::getComplexVoltage ( void   ) 

Return the complex voltage on this bus

Returns:
the complex voltage
int gridpack::powerflow::PFBus::getElementIndex ( std::string &  name,
std::string &  tag 
)

Get index of internal bus element based on character string identifier

Parameters:
name character string describing element
tag character string specifying bus element
Returns:
index of element
void gridpack::powerflow::PFBus::getGeneratorMargins ( std::vector< std::string > &  tag,
std::vector< double > &  current,
std::vector< double > &  pmin,
std::vector< double > &  pmax,
std::vector< int > &  status 
)

Get available margin for generator

Parameters:
tag character ID for generator
current initial generation
pmin minimum allowable generation
pmax maximum allowable generation
status current status of generator
std::vector<double> gridpack::powerflow::PFBus::getGeneratorParticipation (  ) 

Get vector containing generator participation

Returns:
vector of generator participation factors
std::vector<std::string> gridpack::powerflow::PFBus::getGenerators (  ) 

Get list of generator IDs

Returns:
vector of generator IDs
bool gridpack::powerflow::PFBus::getGenStatus ( std::string  gen_id  ) 

Get generator status

Parameters:
gen_id generator ID
Returns:
current status of generator
bool gridpack::powerflow::PFBus::getIgnore (  ) 

Get parameter to ignore voltage violations

Returns:
value of ignore parameter
void gridpack::powerflow::PFBus::getLoadPower ( std::vector< std::string > &  tag,
std::vector< double > &  pl,
std::vector< double > &  ql,
std::vector< int > &  status 
)

Get current value of loads

Parameters:
tag character ID for load
pl initial value of load real power
ql initial value of load reactive power
status current status of load
std::vector<std::string> gridpack::powerflow::PFBus::getLoads (  ) 

Get list of load IDs

Returns:
vector of load IDs
void gridpack::powerflow::PFBus::getParam ( std::string &  name,
int *  value,
int  idx 
)
void gridpack::powerflow::PFBus::getParam ( std::string &  name,
double *  value,
int  idx 
)

Access parameters inside the bus module. This is designed to be extensible

Parameters:
name character string describing parameter to be accessed
value value of parameter
idx index (if necessary) of variable to be accessed
double gridpack::powerflow::PFBus::getPhase ( void   ) 

Return the value of the phase angle on this bus

Returns:
: phase angle
double gridpack::powerflow::PFBus::getVoltage ( void   ) 

Return the value of the voltage magnitude on this bus

Returns:
voltage magnitude
int gridpack::powerflow::PFBus::getXCBufSize ( void   )  [virtual]

Return the size of the buffer used in data exchanges on the network. For this problem, the voltage magnitude and phase angle need to be exchanged

Returns:
size of buffer

Reimplemented from gridpack::component::BaseComponent.

gridpack::ComplexType gridpack::powerflow::PFBus::getYBus ( void   ) 

Get values of YBus matrix. These can then be used in subsequent calculations

Reimplemented from gridpack::ymatrix::YMBus.

int gridpack::powerflow::PFBus::getZone (  ) 

Get zone parameter for bus

Returns:
bus zone index
bool gridpack::powerflow::PFBus::isPV ( void   ) 

Return whether or not the bus is a PV bus (V held fixed in powerflow equations)

Returns:
true if bus is PV bus
void gridpack::powerflow::PFBus::load ( const boost::shared_ptr< gridpack::component::DataCollection > &  data  )  [virtual]

Load values stored in DataCollection object into PFBus object. The DataCollection object will have been filled when the network was created from an external configuration file

Parameters:
data,: DataCollection object contain parameters relevant to this bus that were read in when network was initialized

Reimplemented from gridpack::ymatrix::YMBus.

bool gridpack::powerflow::PFBus::matrixDiagSize ( int *  isize,
int *  jsize 
) const [virtual]

Return size of matrix block on the diagonal contributed by component

Parameters:
isize,jsize,: number of rows and columns of matrix block
Returns:
: false if network component does not contribute matrix element

Reimplemented from gridpack::ymatrix::YMBus.

bool gridpack::powerflow::PFBus::matrixDiagValues ( RealType values  )  [virtual]
bool gridpack::powerflow::PFBus::matrixDiagValues ( ComplexType values  )  [virtual]

Return the values of for a diagonal matrix block. The values are returned in row-major order

Parameters:
values,: pointer to matrix block values
Returns:
: false if network component does not contribute matrix element

Reimplemented from gridpack::ymatrix::YMBus.

void gridpack::powerflow::PFBus::pushIsPV (  ) 

Push p_isPV values from exchange buffer to p_isPV variable

void gridpack::powerflow::PFBus::resetIsPV (  ) 

Reset isPV status

void gridpack::powerflow::PFBus::resetPower (  ) 

Reset power for generators and loads back to original values

void gridpack::powerflow::PFBus::resetVoltage ( void   ) 

Reset voltage and phase angle to initial values

int gridpack::powerflow::PFBus::rhsValues ( double *  rvals  ) 

Evaluate RHS values for powerflow equation and return result as an array of real values

Parameters:
rvals values of Jacobian block
Returns:
number of values returned
void gridpack::powerflow::PFBus::saveData ( boost::shared_ptr< gridpack::component::DataCollection data  )  [virtual]

Save state variables inside the component to a DataCollection object. This can be used as a way of moving data in a way that is useful for creating output or for copying state data from one network to another.

Parameters:
data data collection object into which new values are inserted

Reimplemented from gridpack::component::BaseComponent.

void gridpack::powerflow::PFBus::scaleGeneratorRealPower ( std::string  tag,
double  value 
)

Scale value of real power on all generators

Parameters:
character ID for generator
value scale factor for real power
void gridpack::powerflow::PFBus::scaleLoadPower ( std::string  tag,
double  value 
)

Scale value of real and reactive power on loads

Parameters:
character ID for load
value scale factor for real power
bool gridpack::powerflow::PFBus::serialWrite ( char *  string,
const int  bufsize,
const char *  signal = NULL 
) [virtual]

Update pg of specified bus element based on their genID

Parameters:
busID 
genID 
value Write output from buses to standard out
string (output) string with information to be printed out
signal an optional character string to signal to this
bufsize size of string buffer in bytes routine what about kind of information to write
Returns:
true if bus is contributing string to output, false otherwise

Reimplemented from gridpack::component::BaseComponent.

void gridpack::powerflow::PFBus::setGeneratorRealPower ( std::string  tag,
double  value,
gridpack::component::DataCollection data 
)

Set value of real power on individual generators

Parameters:
tag generator ID
value new value of generator real power
data data collection object associated with bus
void gridpack::powerflow::PFBus::setGenStatus ( std::string  gen_id,
bool  status 
)

Set generator status

Parameters:
gen_id generator ID
status generator status
void gridpack::powerflow::PFBus::setIgnore ( bool  flag  ) 

Set parameter to ignore voltage violations

Parameters:
flag value of ignore parameter
void gridpack::powerflow::PFBus::setIsPV ( int  status  ) 

Set isPV status

Parameters:
status isPV status
void gridpack::powerflow::PFBus::setLoadRealPower ( std::string  tag,
double  value,
gridpack::component::DataCollection data 
)

Set value of real power on individual loads

Parameters:
tag load ID
value new value of load real power
data data collection object associated with bus
void gridpack::powerflow::PFBus::setMode ( int  mode  )  [virtual]

Set the mode to control what matrices and vectors are built when using the mapper

Parameters:
mode,: enumerated constant for different modes

Reimplemented from gridpack::ymatrix::YMBus.

void gridpack::powerflow::PFBus::setParam ( int  busID,
std::string  genID,
double  value 
)
void gridpack::powerflow::PFBus::setParam ( std::string  name,
int  busID,
std::string  genID,
double  value 
)

Modify parameters inside the bus module. This is designed to be extensible

Parameters:
name character string describing parameter to be modified
value new value of parameter
idx index (if necessary) of variable to be modified
void gridpack::powerflow::PFBus::setPhase ( void   ) 

Set phase angle value

void gridpack::powerflow::PFBus::setSBus ( void   ) 

setSBus BUS = (CG*(GEN(ON,PG) + J*GEN(ON,QG)-(PD+J*QD))/BASEMVA

void gridpack::powerflow::PFBus::setScale ( double  scale  ) 

Store scale factor

Parameters:
scale factor for scaling generation or loads
void gridpack::powerflow::PFBus::setSink ( bool  flag  ) 

Label bus as a sink for real time path rating

Parameters:
flag identify bus as sink
void gridpack::powerflow::PFBus::setSource ( bool  flag  ) 

Label bus as a source for real time path rating

Parameters:
flag identify bus as source
void gridpack::powerflow::PFBus::setValues ( gridpack::RealType values  )  [virtual]
void gridpack::powerflow::PFBus::setValues ( gridpack::ComplexType values  )  [virtual]

Set the internal values of the voltage magnitude and phase angle. Need this function to push values from vectors back onto buses

Parameters:
values array containing voltage magnitude and angle

Reimplemented from gridpack::component::MatVecInterface.

void gridpack::powerflow::PFBus::setVoltage ( void   ) 

Set voltage value

void gridpack::powerflow::PFBus::setVoltageLimits ( double  vmin,
double  vmax 
)

Set voltage limits on bus

Parameters:
vmin lower value of voltage
vmax upper value of voltage
void gridpack::powerflow::PFBus::setXCBuf ( void *  buf  )  [virtual]

Assign pointers for voltage magnitude and phase angle

Reimplemented from gridpack::component::BaseComponent.

void gridpack::powerflow::PFBus::setYBus ( void   ) 

Set values of YBus matrix. These can then be used in subsequent calculations

Reimplemented from gridpack::ymatrix::YMBus.

bool gridpack::powerflow::PFBus::vectorSize ( int *  isize  )  const [virtual]

Return size of vector block contributed by component

Parameters:
isize,: number of vector elements
Returns:
: false if network component does not contribute vector element

Reimplemented from gridpack::component::MatVecInterface.

bool gridpack::powerflow::PFBus::vectorValues ( RealType values  )  [virtual]
bool gridpack::powerflow::PFBus::vectorValues ( ComplexType values  )  [virtual]

Return the values of the vector block

Parameters:
values,: pointer to vector values
Returns:
: false if network component does not contribute vector element

Reimplemented from gridpack::component::MatVecInterface.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Feb 2020 for GridPACK by  doxygen 1.6.1